#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

char* fun(int a, int b)
{
	char* s1 = "yes", * s2 = "no";
	int i = 0, sum_a = 0, sum_b = 0;
	for (i = 1; i < a; i++)
	{
		if (a % i == 0)
			sum_a += i;
	}
	for (i = 1; i < b; i++)
	{
		if (b % i == 0)
			sum_b += i;
	}
	if (sum_a == b && sum_b == a)
		return s1;
	else
		return s2;
}
int main()
{
	int a = 0, b = 0;
	scanf("%d %d", &a, &b);
	printf("%s\n", fun(a, b));

	return 0;
}